<?php
$aBreadcrumbs = array();

foreach (Menu::handler('main')->breadcrumbs()->getChildren() as $value) {
    if ($value->getContent()->getContent() != '/') {

        $aBreadcrumbs[] = array(
            'value' => trim(strip_tags($value->getContent()->getValue())),
            'href'  => $value->getContent()->getURL(),
        );
    }
}
?>

<ul class="page-breadcrumb breadcrumb">
    @yield('breadcrumb-button')
    <li>
        <a href="{{ URL::route('home') }}"><i class="fa fa-home"></i></a>
        {{ count($aBreadcrumbs) ? '<i class="fa fa-angle-right"></i>' : null }}
    </li>
    @foreach ($aBreadcrumbs as $key => $value)
    <li>
        <a href="{{ $value['href'] }}">{{ $value['value'] }}</a>
        {{ $key < count($aBreadcrumbs) - 1 ? '<i class="fa fa-angle-right"></i>' : null }}
    </li>
    @endforeach
</ul>